//
// Created by henry on 2025/11/7.
//
#include "back.h"
#include "back_admin.h"
#include "back_admin_menu.h"
//进入后端
int back_entry(){
    printf("欢迎进入后端系统!\n");
    back_menu();
}
//后端菜单
int back_menu(){
    int running =1;
    while (running) {
        printf("=============后端菜单==============\n");
        printf("1.管理员登陆 2.管理注册 3.返回上级\n");
        printf("请输入选择（1-3）：");
        int choose;
        scanf("%d",&choose);
        switch (choose) {
            case 1: {
                int rc = back_admin_login();
                if(rc==0){
                    admin_entry();
                }
                break;
            }
            case 2:
                back_admin_regist();
                break;
            case 3:
                running = 0;
                printf("返回主菜单！\n");
                break;
            default:
                printf("输入错误，请重新输入!\n");
                break;
        }
    }

}